package naga.x.net.impl.websocket;

public class WebSocketConst {

	public static final byte OP_MASK = 0xF; // the mask of opcode
	public static final byte MASK = (byte) 0x80;
	public static final byte PLAYLOAD_LEN_MASK = 0x7f;
	public static final byte PLAYLOAD_LEN_2_BYTES = 126;
	public static final byte PLAYLOAD_LEN_8_BYTES = 127;
	// websocket's opcode
	public static final byte OP_CONTINUATION = 0x0; // a continuation frame
	public static final byte OP_TEXT = 0x1; // a text frame
	public static final byte OP_BINARY = 0x2; // a binary frame
	public static final byte OP_NON_CONTROL1 = 0x3; // 0x3-0x7: reserved for further non-control frames
	public static final byte OP_NON_CONTROL2 = 0x4;
	public static final byte OP_NON_CONTROL3 = 0x5;
	public static final byte OP_NON_CONTROL4 = 0x6;
	public static final byte OP_NON_CONTROL5 = 0x7;
	public static final byte OP_CLOSE = 0x8; // a connection close frame
	public static final byte OP_PING = 0x9; // a ping frame
	public static final byte OP_PONG = 0xA; // a pong frame
	public static final byte OP_CONTROL1 = 0xB; // 0xB-0xF: reserved for further control frames
	public static final byte OP_CONTROL2 = 0xC;
	public static final byte OP_CONTROL3 = 0xD;
	public static final byte OP_CONTROL4 = 0xE;
	public static final byte OP_CONTROL5 = 0xF;
	
}
